package scheduler;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.StringItem;

import commands.*;

public class AboutForm extends Form implements CommandListener{
	private StringItem m_aboutItem;

	private static final Command OkCmd = new Command(Commands.Ok, Command.OK, 1);
		
	private static final String FormName = "About programm"; 
	
	public AboutForm(){
		
		super(FormName);
		
		m_aboutItem=new StringItem("Sheduler ","");
		append(m_aboutItem);
		m_aboutItem=new StringItem("Version: ","");
		append(m_aboutItem);
		m_aboutItem=new StringItem("Author: ","");
		append(m_aboutItem);
		
		addCommand(OkCmd);
				
		setCommandListener(this); 	
	}

	public void commandAction(Command cmd, Displayable arg1) {
		switch(cmd.getCommandType()){
		case Command.OK:
			Dispatcher.getInstance().handleCommand(new Command(Commands.AboutOk, Command.OK,1));
			break;
		}
	}
		
	
}
